import {BASE_URL} from './env.js' //引入接口共用地址
export function uploadFile(path) {
    return new Promise((resolve, reject) => {
        uni.uploadFile({
            url: `${BASE_URL}/api/file/formimage`,
            filePath: path,
            name: "file",
            header: {
                // token: store.getters.token,
            },
            fileType: "image",
            cloudPath: "",
            success: (res) => {
                resolve(res)
            },
            fail: (err) => {
                console.log(err);
                reject();
            },
        });
    });
}
